#include<iostream>
using namespace std;
const long long  N = 1e5+20;
long long  happy[N];
long long  shame[N];
int main()
{
    long long  n,k;
    cin>>n>>k;
    for(long long  i = 0;i<n;i++)cin>>happy[i];
    for(long long i = 0;i<n;i++)cin>>shame[i];
    long long left = 0,right = 0;//固定好滑动窗口
    long long sumh = 0,sums = 0;//记录下滑动窗口的值
    long long hmax = 0,smax = 0,maxi = 0;;//进行比较
    while(right<n)
    {
        sumh+=happy[right];//进窗口
        sums+=shame[right];
        while(right-left+1>k)//出窗口
        {
            sumh-=happy[left];
            sums-=shame[left];
            left++;
        }
        if(right-left+1==k)
        {
            if(sumh>hmax)
            {
                hmax = sumh;
                smax = sums;
                maxi = left;
            }
            else if(sumh==hmax)
            {
                if(sums<smax)
                {
                hmax = sumh;
                smax = sums;
                maxi = left;
                }
            }
        }
        right++;
    }
    cout<<maxi+1;
}
#include<iostream>
#include<climits>
using namespace std;
const long long  N = 1e5+20;
long long  happysum[N];
long long  shamesum[N];
int main()
{
    long long  n,k;
    cin>>n>>k;
    for(long long  i = 1;i<=n;i++)
    {
        cin>>happysum[i];
        happysum[i]+=happysum[i-1];
    }
     for(long long i = 1;i<=n;i++)
    {
        cin>>shamesum[i];
        shamesum[i]+=shamesum[i-1];
    }
    long long hmax = 0,smin = INT_MAX,maxi = 0;
    long long  sumh = 0,sums = 0;
    for(int i = 1;i<=n+1-k;i++)
    {
        sumh = happysum[i+k-1]-happysum[i-1];
        sums = shamesum[i+k-1]-shamesum[i-1];
         if(sumh>hmax)
            {
                hmax = sumh;
                smin = sums;
                maxi = i;
            }
            else if(sumh==hmax)
            {
                if(sums<smin)
                {
                hmax = sumh;
                smin = sums;
                maxi = i;
                }
            }
    }
    cout<<maxi;
}